MACRO(OPENCOG_ADD_ATOM_TYPES SCRIPT_FILE HEADER_FILE DEFINITIONS_FILE INHERITANCE_FILE SCM_FILE PYTHON_FILE)
    ADD_CUSTOM_COMMAND (
        COMMAND "${CMAKE_COMMAND}" -DSCRIPT_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_FILE}\" -DHEADER_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}\" -DDEFINITIONS_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}\" -DINHERITANCE_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}\" -DSCM_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}\" -DPYTHON_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}\" -P "${CMAKE_SOURCE_DIR}/lib/OpenCogAtomTypes.cmake"
        OUTPUT  "${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}"
                "${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}"
                "${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}"
                "${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}"
                "${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}"
        DEPENDS "${SCRIPT_FILE}"
        WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
        COMMENT "Generating opencog types"
    )
ENDMACRO(OPENCOG_ADD_ATOM_TYPES SCRIPT_FILE HEADER_FILE DEFINITIONS_FILE INHERITANCE_FILE SCM_FILE PYTHON_FILE)
